//获取搜索框id
var search = document.getElementById('text')
//获取搜索按钮
var btn_search = document.getElementById('btn_search')
//获取搜索框下拉菜单
var more_search = document.getElementById('more_search')


search.onclick = function (e) {
    search.classList.add('border_one')
    btn_search.classList.add('border_two')
    more_search.style.display = 'block'
    e.stopPropagation()//阻止冒泡
}
document.addEventListener('click', function () {
    more_search.style.display = 'none';//隐藏
    search.classList.remove('border_one')
    btn_search.classList.remove('border_two')
});
more_search.addEventListener('click', function (e) {
    e.stopPropagation()
})


// this.className = 'border_one'
// btn_search.className = 'border_two'
// more_search.className = 'border_three'
// console.log(search.onclick);

